from pydantic_settings import BaseSettings

class Settings(BaseSettings):
    # API配置
    API_V1_STR: str = "/api"
    PROJECT_NAME: str = "在线工具箱 API"
    
    # 文件配置
    MAX_FILE_SIZE: int = 100 * 1024 * 1024  # 100MB
    ALLOWED_EXTENSIONS: dict = {
        "pdf": [".pdf"],
        "image": [".jpg", ".jpeg", ".png", ".webp"],
        "document": [".pdf", ".docx", ".pptx"],
        "audio": [".mp3", ".wav", ".ogg", ".aac"],
        "video": [".mp4", ".avi", ".mkv", ".mov", ".wmv"]
    }
    
    # OCR配置
    OCR_LANGUAGES: dict = {
        "中文+英文": "chi_sim+eng",
        "仅中文": "chi_sim",
        "仅英文": "eng"
    }

    # 图片处理配置
    IMAGE_FORMATS: list = ["jpg", "jpeg", "png", "webp"]
    MAX_IMAGE_SIZE: int = 10 * 1024 * 1024  # 10MB

    # 音频处理配置
    AUDIO_FORMATS: list = ["mp3", "wav", "ogg", "aac"]
    MAX_AUDIO_SIZE: int = 50 * 1024 * 1024  # 50MB

    # 视频处理配置
    VIDEO_FORMATS: list = ["mp4", "avi", "mkv", "mov"]
    MAX_VIDEO_SIZE: int = 100 * 1024 * 1024  # 100MB

settings = Settings() 